
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[WordTemplateIsExist]
	@Id INT,
	@FileName VARBINARY(MAX)
AS
BEGIN
	SELECT COUNT(*) 
	FROM WordTemplate
	WHERE 
		FileName = @FileName 
		AND Deleted = 0
		AND Id != @Id
END
GO
